home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / SCRIPTZ / SUPERHUG.ZIP / superhug.txt
Text File  |  1996-12-29  |  2KB  |  55 lines

  1. **********************
  2. * 'Smart' Hug script *
  3. * ================== *
  4. **********************
  5.  
  6. Pls find enclosed a script which goes in your popup
  7. definitions, channel names list. Okay, so it isn't exactly 
  8. *the* most useful script, but I basically wanted to see if I could 
  9. do it, and now I'm happy...;-) Still you could use the principle
  10. for a lot of other things.
  11.  
  12. .Hugs!!: {
  13.   /set %hugnumber 1
  14.   /set %hugtotal ""
  15.   /set %totalnicks $snick(0,#) 
  16.   /set %presentnicks 1
  17.   :start
  18.   /set %hugnicks $snick(%hugnumber,#)
  19.   if (1 = %totalnicks) goto singlenick
  20.   if (%presentnicks = %totalnicks) /me gives %hugtotal and %hugnicks a whopping great big <ò!HUG!ò>
  21.   else {
  22.     /set %hugtotal %hugtotal %hugnicks $+ ,
  23.     /inc %hugnumber 1
  24.     /inc %presentnicks 1
  25.     goto start 
  26.   }  
  27.   goto end
  28.   :singlenick
  29.   /me gives %hugnicks a whopping great big <ò!HUG!ò>
  30.   :end
  31. }
  32.  
  33. All the script does is put commas between each nick you 'hug',
  34. and puts an 'and' before the last person - good English,
  35. basically... interesting how to actually get a script to do it.
  36.  
  37. The $snick(0,#) is v v v important, if you use $nick(0,#) it
  38. will select all the nicks on the channel, instead of just the ones
  39. you ctrl-click select from the list. It also compensates for when
  40. you hug one person only.
  41.  
  42. I'm using mIRC 4.52 for this.
  43.  
  44. Have a <Huggin'> good time...;-■
  45.  
  46. Obviously u can do whattevver you want, but if you include this script in a bot,
  47. I'd appreciate a mention of my nick, and The <ò> Aut0Bot <ò>, cheerz.
  48.  
  49. Hi'z to oH_yEaH, Wichita-Guy, ^monty, MEK and sumWOMAN
  50.  
  51. **************************************************
  52. *   'Smart' <hug> script, part of the Aut0Bot,   *
  53. * ⌐1996 written by Phillip Renfield aka _Qu^rtZ_ *
  54. **************************************************
  55.